log4j warnning

1
2
log4j:WARN Continuable parsing error 39 and column 23
log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)".

log4j.xml的DTD规定log4j:configuration中的所有元素应该按照如下的顺序排列:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<renderer></renderer>

<appender></appender>

<plugin></plugin>

<logger></logger>

<category></category>

<root></root>

<loggerfactory></loggerfactory>

<categoryfactory></categoryfactory>

因此调整log4j.xml中的元素顺序即可避免该warnning